package com.example.sevicedemo

import android.app.Service
import android.content.Intent
import android.os.IBinder

class AIDLService : Service() {

    override fun onBind(intent: Intent): IBinder {
        return MyBinder()
    }

    class MyBinder : ILoginAidlInterface.Stub() {

        var loginStatus: Int = 0
        var loginUser: String? = ""

        override fun login() {
            println("MyBinder.login")
        }

        override fun loginCallback(loginStatus: Int, loginUser: String?) {
            this.loginStatus = loginStatus;
            this.loginUser = loginUser;
            println("MyBinder.loginCallback loginStatus=$loginStatus loginUser=$loginUser")
        }

    }


}